<template>
    <div class="content">
        <div class="box">
            <el-row>
                <el-col :span="24">
                    <el-input id="name" v-model="name" placeholder="请输入帐号">
                        <template slot="prepend">帐号</template>
                    </el-input>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-input id="password" v-model="password" type="password" placeholder="请输入密码">
                        <template slot="prepend">密码</template>
                    </el-input>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-button id="login" v-on:click="check" style="width:100%" type="primary">登录</el-button>
                </el-col>
            </el-row>
        </div>
    </div>
</template>

<style>

    .content {
        margin: 0 auto;
        max-width: 350px;
    }

    .box {
        margin-top: 45%;
    }

    .el-row {
        margin-bottom: 20px;

    &
    :last-child {
        margin-bottom: 0;
    }

    }
    .login-box {
        margin-top: 20%;
        margin-left: 40%;
    }
</style>

<script>
    export default {
        data() {
            return {
                formName: {//表单中的参数
                    user: '',
                    userError: '',
                    password: '',
                    passwordError: '',
                    beDisabled: true
                },
                beShow: false//传值给父组件
            }
        }
    }
</script>